from django.contrib import admin
from .models import User, Permission
admin.site.register(User)
# Register your models here.


# 注册权限 模型类
class PermissionManager(admin.ModelAdmin):
    list_display = ["id", "name", "code_name", "type_name"]
    list_display_links = ["id",]
    list_editable = ["name", 'code_name']
    list_filter = ["type_name",]
    search_fields = ["name",]


admin.site.register(Permission, PermissionManager)